package com.zyh.day02.value

import org.apache.spark.rdd.RDD
import org.apache.spark.{SparkConf, SparkContext}

object GlomTest {
  def main(args: Array[String]): Unit = {
    val conf = new SparkConf()
      .setAppName("mr")
      .setMaster("local[*]")
    val sc = new SparkContext(conf)

    val rdd1: RDD[Int] = sc.makeRDD(1 to 4,2)
    val rdd2: RDD[Array[Int]] = rdd1.glom()
    rdd2.collect().foreach(v=>{
      println(v.mkString(","))
    })











    sc.stop()
  }
}
